package com.xbongbong.pro.message.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * 推送类型枚举
 * @author 魏荣杰
 * @date 2019/1/15 15:04
 * @since v1.0
 * @version v1.0
 */
@Getter
public enum PushTypeEnum {

    //******************************************crm***********************************************//
    /**
     * CRM
     * 客户 101
     */
    CUSTOMER_PUSH(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 0, "enum.pushType.name.customer_push", "customerPush", 1, ""),
    CUSTOMER_ADD_PUSH(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 1, "enum.pushType.name.customer_add_push", "customerAddPush", 1, ""),
    CUSTOMER_CHANGE_PUSH(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 2, "enum.pushType.name.customer_change_push", "customerChangePush", 1, ""),
    CUSTOMER_HANDOVER_PUSH(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 3, "enum.pushType.name.customer_handover_push", "customerHandoverPush", 1, ""),
    CUSTOMER_DISTRIBUTION_PUSH(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 4, "enum.pushType.name.customer_distribution_push", "customerDistributionPush", 1, ""),
    //这个CUSTOMER_BACK_PUBLIC枚举用于推送设置页 推送客 户即将退回公海池消息时请用 CUSTOMER_BACK_PUSH 和 CUSTOMER_WILL_BACK_PUSH  @author 魏荣杰  @date 2018/8/29 11:21
    CUSTOMER_BACK_PUBLIC(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 5, "enum.pushType.name.customer_back_public", "customerBackPublic", 1, ""),
    CUSTOMER_TRANSFER_PUBLIC(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 8, "enum.pushType.name.customer_transfer_public", "customerTransferPublic", 1, ""),
    CUSTOMER_TEAM_ADD_DEL_MAIN(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 6, "enum.pushType.name.customer_team_add_del_main", "customerTeamAddDelMain", 1, ""),
    CUSTOMER_TEAM_ADD_DEL_SYNERGETIC(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 7, "enum.pushType.name.customer_team_add_del_synergetic", "customerTeamAddDelSynergetic", 1, ""),
    //经过讨论目前这两个先不加CUSTOMER_BIRTHDAY 和 CUSTOMER_FORGET ，在/pushSetApi/detail接口里去掉 @author 魏荣杰  @date 2018/9/4 10:21
//    CUSTOMER_BIRTHDAY(XbbRefTypeEnum.CUSTOMER.getCode(), 8, "客户生日提醒", "customerBirthday", 1, ""),
//	CUSTOMER_FORGET(XbbRefTypeEnum.CUSTOMER.getCode(), 9, "遗忘客户提醒", "customerForget", 1, ""),
    /**
     * 客户自定义提醒 111
     */
    CUSTOMER_REMIND(XbbRefTypeEnum.CUSTOMER_REMIND.getCode(), 0, "enum.pushType.name.customer_remind","customerRemind", 0, ""),
    /*
    * 客户阶段 code 108
    * */
    CUSTOMER_STAGE(XbbRefTypeEnum.CUSTOMER_STAGE.getCode(),0,"enum.pushType.name.customer_stage","customerStagePush",1,""),
    /**
     * 客户退回公海池 code 110
     */
    CUSTOMER_BACK_PUSH(XbbRefTypeEnum.CUSTOMER_BACK_REMIND.getCode(), 0, "enum.pushType.name.customer_back_push", "customerBackPush", 0, ""),
    CUSTOMER_WILL_BACK_PUSH(XbbRefTypeEnum.CUSTOMER_BACK_REMIND.getCode(), 1, "enum.pushType.name.customer_will_back_push", "customerWillBackPush", 0, ""),
    /**
     * 客户转移公海池 code 116
     */
    CUSTOMER_TRANSFER_PUSH(XbbRefTypeEnum.CUSTOMER_TRANSFER_REMIND.getCode(), 0, "enum.pushType.name.customer_transfer_push", "customerTransferPush", 0, ""),
    CUSTOMER_WILL_TRANSFER_PUSH(XbbRefTypeEnum.CUSTOMER_TRANSFER_REMIND.getCode(), 1, "enum.pushType.name.customer_will_transfer_push", "customerWillTransferPush", 0, ""),

    /**
     * 联系人 401
     */
    CONTACT_PUSH(XbbRefTypeEnum.CONTACT.getCode(), 0, "enum.pushType.name.contact_push", "contactPush", 1, ""),
    CONTACT_NEW(XbbRefTypeEnum.CONTACT.getCode(), 1, "enum.pushType.name.contact_new", "contactNew", 1, ""),
    //经过讨论目前这个CONTACT_BIRTHDAY先不加  @author 魏荣杰  @date 2018/9/4 10:21
//    CONTACT_BIRTHDAY(XbbRefTypeEnum.CONTACT.getCode(), 2, "联系人生日提醒", "contactBirthday", 1, ""),
    /**
     * 销售机会 301
     */
    OPPORTUNITY_PUSH(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), 0, "enum.pushType.name.opportunity_push", "opportunityPush", 1, ""),
    OPPORTUNITY_ADD_PUSH(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), 1, "enum.pushType.name.opportunity_add_push", "opportunityAddPush", 1, ""),
    OPPORTUNITY_CHANGE_PUSH(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), 2, "enum.pushType.name.opportunity_change_push", "opportunityChangePush", 1, ""),
    OPPORTUNITY_EXPIRE_PUSH(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), 3, "enum.pushType.name.opportunity_expire_push", "opportunityExpirePush", 1, ""),
    OPPORTUNITY_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), 4, "enum.pushType.name.opportunity_team_add_del_main_push", "opportunityTeamAddDelMainPush", 1, ""),
    OPPORTUNITY_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.SALES_OPPORTUNITY.getCode(), 5, "enum.pushType.name.opportunity_team_add_del_synergetic_push", "opportunityTeamAddDelSynergeticPush", 1 , ""),
    /**
     * 销售阶段 304
     */
    OPPORTUNITY_STAGE_PUSH(XbbRefTypeEnum.SALE_STAGE.getCode(), 0, "enum.pushType.name.opportunity_stage_push", "opportunityStagePush", 1 , ""),
    /**
     * 访客计划 601
     */
    COMMUNICATE_PLAN_PUSH(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 0, "enum.pushType.name.communicate_plan_push", "communicatePlanPush", 1, ""),
    COMMUNICATE_PLAN_ADD_PUSH(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 1, "enum.pushType.name.communicate_plan_add_push", "communicatePlanAddPush", 1, ""),
    //截止这个时间点时,目前COMMUNICATE_PLAN_ADD_DEL_EXECUTOR_PUSH  COMMUNICATE_PLAN_DELAY_PUSH         COMMUNICATE_PLAN_CANCEL_PUSH         COMMUNICATE_PLAN_DEL_PUSH这些没在用,如果后面用了,请注明   @author 魏荣杰 @date 2019/1/18 16:28
//    COMMUNICATE_PLAN_ADD_DEL_EXECUTOR_PUSH(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 2, "访客计划添加删除执行人", "communicatePlanAddDelExecutorPush", 1, ""),
//    COMMUNICATE_PLAN_DELAY_PUSH(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 3, "访客计划延期", "communicatePlanDelayPush", 1, ""),
//    COMMUNICATE_PLAN_CANCEL_PUSH(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 4, "访客计划取消", "communicatePlanCancelPush", 1 , ""),
//    COMMUNICATE_PLAN_DEL_PUSH(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 5, "访客计划删除", "communicatePlanDelPush", 1, ""),
    /**
     * 跟进记录 501
     */
    COMMUNICATE_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 0, "enum.pushType.name.communicate_push","communicatePush", 1, ""),
    COMMUNICATE_ADD_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 1, "enum.pushType.name.communicate_add_push","communicateAddPush", 1, ""),
    COMMUNICATE_LIKE_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 2, "enum.pushType.name.communicate_like_push","communicateLikePush", 1, ""),
    COMMUNICATE_COMMENT_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 3, "enum.pushType.name.communicate_comment_push","communicateCommentPush", 1, ""),
    COMMUNICATE_REPLY_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 4, "enum.pushType.name.communicate_reply_push","communicateReplyPush", 1, ""),
    COMMUNICATE_AT_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 5, "enum.pushType.name.communicate_at_push", "communicatAtPush", 1, ""),
    COMMUNICATE_COMMENT_DEL_PUSH(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(),6, "enum.pushType.name.communicate_comment_del_push","communicateCommentDelPush",1,""),
    //截止这个时间点时,目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
//    COMMUNICATE_ADD_PUSH_SUPPLIER(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 6, "供应商跟进创建消息推送","communicateAddPushSupplier", 1, ""),
//    COMMUNICATE_LIKE_PUSH_SUPPLIER(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 7, "供应商跟进点赞消息推送","communicateLikePushSupplier", 1, ""),
//    COMMUNICATE_COMMENT_PUSH_SUPPLIER(XbbRefTypeEnum.SUPPLIER_COMMUNICATE.getCode(), 8, "供应商跟进评论消息推送","communicateCommentPushSupplier", 1, ""),
//    COMMUNICATE_REPLY_PUSH_SUPPLIER(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 9, "供应商跟进回复消息推送","communicateReplyPushSupplier", 1, ""),
//    COMMUNICATE_ADD_PUSH_PURCHASE(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 10, "采购合同跟进创建消息推送","communicateAddPushPurchase", 1, ""),
//    COMMUNICATE_LIKE_PUSH_PURCHASE(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 11, "采购合同跟进点赞消息推送","communicateLikePushPurchase", 1, ""),
//    COMMUNICATE_COMMENT_PUSH_PURCHASE(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 12, "采购合同跟进评论消息推送","communicateCommentPushPurchase", 1, ""),
//    COMMUNICATE_REPLY_PUSH_PURCHASE(XbbRefTypeEnum.CUSTOMER_COMMUNICATE.getCode(), 13, "采购合同跟进回复消息推送","communicateReplyPushPurchase", 1, ""),
//    COMMUNICATE_AT_PUSH_SUPPLIER(XbbRefTypeEnum.SUPPLIER_COMMUNICATE.getCode(), 14, "enum.pushType.name.communicate_at_push", "communicatAtPushSupplier", 1, ""),

    //*******************************************//
    /**
     * 合同  201
     */
    CONTRACT_PUSH(XbbRefTypeEnum.CONTRACT.getCode(), 0, "enum.pushType.name.contract_push","contractPush", 1, ""),
    CONTRACT_ADD_PUSH(XbbRefTypeEnum.CONTRACT.getCode(), 1, "enum.pushType.name.contract_add_push","contractAddPush", 1, ""),
    CONTRACT_CHANGE_PUSH(XbbRefTypeEnum.CONTRACT.getCode(), 2, "enum.pushType.name.contract_change_push","contractChangePush", 1, ""),
    CONTRACT_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.CONTRACT.getCode(), 3, "enum.pushType.name.contract_team_add_del_main_push", "contractTeamAddDelMainPush", 1, ""),
    CONTRACT_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.CONTRACT.getCode(), 4, "enum.pushType.name.contract_team_add_del_synergetic_push", "contractTeamAddDelSynergeticPush", 1, ""),
    /**
     * 合同到期提醒 203
     */
    CONTRACT_REMIND(XbbRefTypeEnum.CONTRACT_REMIND.getCode(), 0, "enum.pushType.name.contract_remind","contractRemind", 0, ""),
    CONTRACT_STAGE_PUSH(XbbRefTypeEnum.CONTRACT_STAGE.getCode(), 0, "enum.pushType.name.contract_stage_push", "contractStagePush", 1 , ""),
    /**
     * 应收款 701
     */
    PAYMENT_PLAN_ADD(XbbRefTypeEnum.PAYMENT.getCode(), 0, "enum.pushType.name.payment_plan_add", "paymentPlanAdd", 1, ""),
//    PAYMENT_PLAN_PUSH(XbbRefTypeEnum.PAYMENT.getCode(), 0, "enum.pushType.name.payment_plan_push", "paymentPlanPush", 1, ""),
    /**
     * 回款单 702
     */
    PAYMENT_SHEET_ADD(XbbRefTypeEnum.PAYMENT_SHEET.getCode(), 0, "enum.pushType.name.payment_sheet_add", "paymentSheetAdd", 1, ""),
    /**
     * 红冲回款单 703
     */
    PAYMENT_SHEET_RED_ADD(XbbRefTypeEnum.RED_PAYMENT_SHEET.getCode(), 0, "enum.pushType.name.payment_sheet_red_add", "paymentSheetRedAdd", 1, ""),
    /**
     * 坏账 704
     */
    PAYMENT_SHEET_BAD_ADD(XbbRefTypeEnum.BAD_DEBT.getCode(), 0, "enum.pushType.name.payment_sheet_bad_add", "paymentSheetBadAdd", 1, ""),
    /**
     * 未回款提醒 705
     */
    PAYMENT_REMIND(XbbRefTypeEnum.PAYMENT_REMIND.getCode(), 0, "enum.pushType.name.payment_remind","paymentRemind", 0, ""),
    /**
     * 逾期回款提醒 706
     */
    PAYMENT_OVERDUE(XbbRefTypeEnum.PAYMENT_OVERDUE.getCode(), 0, "enum.pushType.name.payment_overdue", "paymentOverdue", 1, ""),
    /**
     * 预收款 708
     */
    PAYMENT_SHEET_PREPAYMENT_ADD(XbbRefTypeEnum.PREPAYMENT.getCode(), 0, "enum.pushType.name.payment_sheet_prepayment_add", "prepaymentAdd", 1, ""),

    /**
     * 红冲预收款余额 711
     */
    PAYMENT_SHEET_RED_PREPAYMENT_ADD(XbbRefTypeEnum.RED_PREPAYMENT.getCode(), 0, "enum.pushType.name.payment_sheet_red_prepayment_add", "redPrepaymentAdd", 1, ""),

    /**
     * 发票 code 901
     */
    INVOICE_PUSH(XbbRefTypeEnum.INVOICE.getCode(), 0, "enum.pushType.name.sales_invoice_push", "invoicePush", 1, ""),
    INVOICE_ADD_PUSH(XbbRefTypeEnum.INVOICE.getCode(), 1, "enum.pushType.name.sales_invoice_add_push", "invoicePushAdd", 1, ""),
    INVOICE_DEL_PUSH(XbbRefTypeEnum.INVOICE.getCode(), 2, "enum.pushType.name.sales_invoice_del_push", "invoiceDelPush", 1, ""),
    INVOICE_REDUCTION(XbbRefTypeEnum.INVOICE.getCode(), 3, "enum.pushType.name.sales_invoice_reduction", "invoiceReduction", 1, ""),
    INVOICE_INVALIDATION(XbbRefTypeEnum.INVOICE.getCode(), 4, "enum.pushType.name.sales_invoice_invalidation", "invoiceInvalidation", 1, ""),
    /**
     * 红冲发票 902
     */
    INVOICE_RED_ADD_PUSH(XbbRefTypeEnum.RED_INVOICE.getCode(), 0, "enum.pushType.name.sales_invoice_red_add_push", "invoiceRedAddPush", 1, ""),

    /**
     * 进项发票 code 903
     */
    PURCHASE_INVOICE_PUSH(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), 0, "enum.pushType.name.input_invoice_push", "purchaseInvoicePush", 1, ""),
    PURCHASE_INVOICE_ADD_PUSH(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), 1, "enum.pushType.name.input_invoice_add_push", "purchaseInvoicePushAdd", 1, ""),
    PURCHASE_INVOICE_DEL_PUSH(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), 2, "enum.pushType.name.input_invoice_del_push", "purchaseInvoiceDelPush", 1, ""),
    PURCHASE_INVOICE_REDUCTION(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), 3, "enum.pushType.name.input_invoice_reduction", "invoiceReduction", 1, ""),
    PURCHASE_INVOICE_INVALIDATION(XbbRefTypeEnum.PURCHASE_INVOICE.getCode(), 4, "enum.pushType.name.input_invoice_invalidation", "purchaseInvoiceInvalidation", 1, ""),
    /**
     * 红冲发票 904
     */
    PURCHASE_INVOICE_RED_ADD_PUSH(XbbRefTypeEnum.RED_PURCHASE_INVOICE.getCode(), 0, "enum.pushType.name.input_invoice_red_add_push", "purchaseInvoiceRedAddPush", 1, ""),
    /**
     * 付款计划 801
     */
    PAY_PLAN_ADD(XbbRefTypeEnum.PAY_PLAN.getCode(), 0, "enum.pushType.name.pay_plan_add", "payPlanAdd", 1, ""),
    PAY_PLAN_PUSH(XbbRefTypeEnum.PAY_PLAN.getCode(), 0, "enum.pushType.name.pay_plan_push", "payPlanPush", 1, ""),
    /**
     * 未付款提醒 812
     */
    PAY_PLAN_REMIND(XbbRefTypeEnum.PAY_PLAN_REMIND.getCode(), 0, "enum.pushType.name.pay_plan_remind","payPlanRemind", 0, ""),
    /**
     * 逾期付款提醒 813
     */
    PAY_PLAN_OVERDUE(XbbRefTypeEnum.PAY_PLAN_OVERDUE.getCode(), 0, "enum.pushType.name.pay_plan_overdue", "payPlanOverdue", 1, ""),
    /**
     * 付款单 802
     */
    PAY_SHEET_ADD(XbbRefTypeEnum.PAY_SHEET.getCode(), 0, "enum.pushtype.name.pay_sheet_add", "paySheetAdd", 1, ""),
    /**
     * 红冲付款单 806
     */
    PAY_SHEET_RED_ADD(XbbRefTypeEnum.RED_WRITE_OFF_PAY.getCode(), 0, "enum.pushtype.name.pay_sheet_red_add", "paySheetRedAdd", 1, ""),
    /**
     * 坏账 809
     */
    PAY_SHEET_BAD_ADD(XbbRefTypeEnum.BAD_PAY.getCode(), 0, "enum.pushtype.name.pay_sheet_bad_add", "paySheetBadAdd", 1, ""),
    /**
     * 预付款 805
     */
    PAY_SHEET_PREPAY_ADD(XbbRefTypeEnum.PREPAY.getCode(), 0, "enum.pushtype.name.pay_sheet_prepay_add", "prepayAdd", 1, ""),

    /**
     * 红冲预付款余额 808
     */
    PAY_SHEET_RED_PREPAY_ADD(XbbRefTypeEnum.RED_PREPAY.getCode(), 0, "enum.pushtype.name.pay_sheet_red_prepay_add", "redPrepayAdd", 1, ""),
    /**
     * 销售简报 3201
     */
    SALE_REPORT_PUSH(XbbRefTypeEnum.SALES_REPORT_ENTITY.getCode(), 0, "enum.pushType.name.sale_report_push", "saleReportPush", 0, ""),

    /**
     * 访客计划 601
     */
    //截止这个时间点时,目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
    COMMUNICATE_PLAN_REMIND(XbbRefTypeEnum.COMMUNICATE_PLAN.getCode(), 0, "enum.pushType.name.communicate_plan_remind","communicatePlanRemind", 0, ""),

    /**
     * 工作报告 2101
     */
    WORK_REPORT_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 0, "enum.pushType.name.work_report_push", "workReportPush", 1, ""),
    WORK_REPORT_ADD_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 1, "enum.pushType.name.work_report_add_push", "workReportAddPush", 1, ""),
    WORK_REPORT_COMMENT_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 2, "enum.pushType.name.work_report_comment_push","workReportCommentPush", 1, ""),
    WORK_REPORT_COMMENT_LIKE_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 3, "enum.pushType.name.work_report_comment_like_push", "workReportCommentLikePush", 1, ""),
    WORK_REPORT_AT_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 4, "enum.pushType.name.work_report_at_push", "workReportAtPush", 1, ""),
    WORK_REPORT_COMMENT_DEL_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 5, "enum.pushType.name.work_report_comment_del_push","workReportCommentDelPush", 1, ""),
    WORK_REPORT_REMIND_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 6, "enum.pushType.name.work_report_remind_push","workReportRemindPush", 1, ""),
    WORK_REPORT_OVERDUE_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 7, "enum.pushType.name.work_report_overdue_push","workReportOverduePush", 1, ""),
    WORK_REPORT_COMMENT_UNREAD_PUSH(XbbRefTypeEnum.WORK_REPORT.getCode(), 8, "enum.pushType.name.work_report_comment_unRead_push","workReportUnReadPush", 1, ""),

    /**
     * code 2001 签到
     */
    SIGN_IN_ADD_PUSH(XbbRefTypeEnum.SIGNIN.getCode(), 0, "enum.pushType.name.sign_in_add_push", "signInAddPush", 1, ""),

    //******************************************jxc***********************************************//
    /**
     * 产品 2401
     */
    //截止这个时间点时,目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
//    PRODUCT_PUSH(XbbRefTypeEnum.PRODUCT.getCode(), 0, "enum.pushType.name.product_push", "productPush", 1, ""),
    /**
     * 采购合同 code 1101
     */
    PURCHASE_PUSH(XbbRefTypeEnum.PURCHASE.getCode(), 0, "enum.pushType.name.purchase_push", "purchasePush", 1, ""),
    WAIT_PURCHASE_PUSH(XbbRefTypeEnum.PURCHASE.getCode(), 1, "enum.pushType.name.wait_purchase_push", "waitpurchasePush", 1, ""),
    PURCHASE_SUCCESS_PUSH(XbbRefTypeEnum.PURCHASE.getCode(), 2, "enum.pushType.name.purchase_success_push", "purchaseSuccessPush", 1, ""),
    PURCHASE_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.PURCHASE.getCode(), 3, "enum.pushType.name.purchase_team_add_del_main_push", "purchaseTeamAddDelMainPush", 1, ""),
    PURCHASE_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.PURCHASE.getCode(), 4, "enum.pushType.name.purchase_team_add_del_synergetic_push", "purchaseTeamAddDelSynergeticPush", 1, ""),
    /**
     * 入库单 code 1401
     */
    INSTOCK_PUSH(XbbRefTypeEnum.INSTOCK.getCode(), 0, "enum.pushType.name.instock_push", "instockPush", 1, ""),
    WAIT_INSTOCK_PUSH(XbbRefTypeEnum.INSTOCK.getCode(), 1, "enum.pushType.name.wait_instock_push", "waitInstockPush", 1, ""),
    //提醒仓库主管和合同负责人已经入库
    INSTOCK_SUCCESS_PUSH(XbbRefTypeEnum.INSTOCK.getCode(), 2, "enum.pushType.name.instock_success_push", "instockSuccessPush", 1, ""),
    /**
     * 出库单 code 1501
     */
    OUTSTOCK_PUSH(XbbRefTypeEnum.OUTSTOCK.getCode(), 0, "enum.pushType.name.outstock_push", "outstockPush", 1, ""),
    WAIT_OUTSTOCK_PUSH(XbbRefTypeEnum.OUTSTOCK.getCode(), 1, "enum.pushType.name.wait_outstock_push", "waitOutstockPush", 1, ""),
    //提醒仓库主管和合同负责人产品已经出库
    OUTSTOCK_SUCCESS_PUSH(XbbRefTypeEnum.OUTSTOCK.getCode(), 2, "enum.pushType.name.outstock_success_push", "outstockSuccessPush", 1, ""),
    /**
     * 供应商 code 1001
     */
    SUPPLIER_PUSH(XbbRefTypeEnum.SUPPLIER.getCode(), 0, "enum.pushType.name.supplier_push", "supplierPush", 1, ""),
    SUPPLIER_ADD_PUSH(XbbRefTypeEnum.SUPPLIER.getCode(), 1, "enum.pushType.name.supplier_add_push", "supplierAddPush", 1, ""),
    SUPPLIER_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.SUPPLIER.getCode(), 2, "enum.pushType.name.supplier_team_add_del_main_push", "supplierTeamAddDelMainPush", 1, ""),
    SUPPLIER_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.SUPPLIER.getCode(), 3, "enum.pushType.name.supplier_team_add_del_synergetic_push", "supplierTeamAddDelSynergeticPush", 1, ""),
    /**
     * 供应商联系人 code 1002
     */
//    SUPPLIER_CONTACT_PUSH(XbbRefTypeEnum.SUPPLIER_CONTACT.getCode(), 0, "enum.pushType.name.supplier_contact_push", "supplierContactPush", 1, ""),

    /**
     * 盘点单 code 1701
     */
//    INVENTORY_PUSH(XbbRefTypeEnum.INVENTORY.getCode(), 0, "enum.pushType.name.inventory_push", "inventoryPush", 1, ""),

    /**
     * 调拔单 code 1601
     */
//    TRANSFER_PUSH(XbbRefTypeEnum.TRANSFER.getCode(), 0, "enum.pushType.name.transfer_push", "transferPush", 1, ""),
    /**
     * 出入库单 code 1301
     */
//    ASSEMBLE_PUSH(XbbRefTypeEnum.ASSEMBLE.getCode(), 0, "enum.pushType.name.assemble_push", "assemblePush", 1, ""),

    /**
     * Bom清单 code 2601
     */
    BOMBILL_PUSH(XbbRefTypeEnum.BOM_BILL.getCode(),0,"enum.pushType.name.bombill_push","bomBillPush",1,""),
    BOMBILL_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.BOM_BILL.getCode(),1,"enum.pushType.name.bombill_team_add_del_main_push","bombillTeamAddDelMainPush",1,""),
    BOMBILL_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.BOM_BILL.getCode(),2,"enum.pushType.name.bombill_team_add_del_synergetic_push","bombillTeamAddDelSynergeticPush",1,""),
    /**
     * 生产单 code 2801
     */
    PRODUCTION_ORDER_PUSH(XbbRefTypeEnum.PRODUCTION_ORDER.getCode(), 0, "enum.pushType.name.production_order_push","productionOrderPush",1,""),
    PRODUCTION_ORDER_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.PRODUCTION_ORDER.getCode(), 1, "enum.pushType.name.production_order_team_add_del_main_push","productionOrderTeamAddDelMainPush",1,""),
    PRODUCTION_ORDER_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.PRODUCTION_ORDER.getCode(), 2, "enum.pushType.name.production_order_team_add_del_synergetic_push","productionOrderTeamAddDelSynergeticPush",1,""),
    /**
     * code 202 退货退款
     */
    //TODO 退货退款与jxc相关 一起处理,本版本不处理  @author 魏荣杰  @date 2018/8/15 17:21
    //截止这个时间点时,目前 退货退款 没在用,如果后面用了,请注明  @date 2019/2/25 17:27  @author 魏荣杰
    //REFUND_PUSH(XbbRefTypeEnum.REFUND.getCode(), 0 , "enum.pushType.name.refund_push", "refundPush", 1, ""),
    //REFUND_ADD_PUSH(XbbRefTypeEnum.REFUND.getCode(), 1, "enum.pushType.name.refund_add_push", "refundAddPush", 1, ""),
    //REFUND_ADD_WITH_PRODUCT_PUSH(XbbRefTypeEnum.REFUND.getCode(), 2, "enum.pushType.name.refund_add_with_product_push", "refundAddWithProductPush", 1, ""),
    //REFUND_ADD_WITHOUT_PRODUCT_PUSH(XbbRefTypeEnum.REFUND.getCode(), 3, "enum.pushType.name.refund_add_without_product_push", "refundAddWithoutProductPush", 1, ""),
    /**
     * 采购退货 code 1201
     */
    //截止这个时间点时,目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
    RETURNED_PURCHASE_PUSH(XbbRefTypeEnum.RETURNED_PURCHASE.getCode(), 0, "enum.pushType.name.returned_purchase_push", "returnedPurchase", 1, ""),

    //******************************************协同办公***********************************************//
    /**
     * 工作流（审批） 2201
     */
    APPROVAL_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 0, "enum.pushType.name.approval_push","approvalPush", 1, ""),
    APPROVAL_ADD_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 1, "enum.pushType.name.approval_add_push","approvalAddPush", 1, ""),
    APPROVAL_CHANGE_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 2, "enum.pushType.name.approval_change_push","approvalChangePush", 1, ""),
    APPROVAL_NODE_CHANGE_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 3, "enum.pushType.name.approval_node_change_push","approvalNodeChangePush", 1, ""),
    APPROVAL_AGREE_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 4, "enum.pushType.name.approval_agree_push", "approvalAgreePush", 1, ""),
    APPROVAL_REFUSE_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 5, "enum.pushType.name.approval_refuse_push", "approvalRefusePush", 1, ""),
    APPROVAL_REEDIT_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 6, "enum.pushType.name.approval_reedit_push", "approvalReeditPush",1, ""),
    APPROVAL_CARBON_COPY_PUSH(XbbRefTypeEnum.APPROVAL.getCode(), 7, "enum.pushType.name.approval_carbon_copy_push", "approvalCarbonCopyPush",1, ""),
    APPROVAL_COMMENT_AT(XbbRefTypeEnum.APPROVAL.getCode(), 8, "enum.pushType.name.approval_comment_at","approvalCommentAt", 1, ""),
    APPROVAL_COMMENT_EDIT(XbbRefTypeEnum.APPROVAL.getCode(), 9, "enum.pushType.name.approval_comment_edit","approvalCommentEdit", 1, ""),
    APPROVAL_COMMENT_DEL(XbbRefTypeEnum.APPROVAL.getCode(), 10, "enum.pushType.name.approval_comment_del","approvalCommentDel", 1, ""),

    //******************************************工单中心***********************************************//
    /**
     * 工单 code 2301
     */
    WORKORDER_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 0, "enum.pushType.name.workorder_push", "workOrderPush", 1, ""),
    WORKORDER_DEL_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 1, "enum.pushType.name.workorder_del_push", "workOrderDelPush", 1, ""),
    WORKORDER_DYNAMIC_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 2, "enum.pushType.name.workorder_dynamic_push", "workorderDynamicPush", 1, ""),

    WORKORDER_NEW_EXECUTOR(XbbRefTypeEnum.WORK_ORDER.getCode(), 3 , "enum.pushType.name.workorder_new_executor", "workOrderNewExecutor", 1, ""),
    WORKORDER_NEW_EXECUTED(XbbRefTypeEnum.WORK_ORDER.getCode(), 4 , "enum.pushType.name.workorder_new_executed", "workOrderNewExecuted", 1 , ""),
    WORKORDER_CONFIRM(XbbRefTypeEnum.WORK_ORDER.getCode(), 5 , "enum.pushType.name.workorder_confirm", "workorderConfirm", 1 , ""),
    WORKORDER_TEAM(XbbRefTypeEnum.WORK_ORDER.getCode(), 6, "enum.pushType.name.workorder_team", "workOrderTeam", 1, ""),
    WORKORDER_STAGE_COMPLETE(XbbRefTypeEnum.WORK_ORDER.getCode(), 7, "enum.pushType.name.workorder_stage_complete", "workOrderStageComplete", 1, ""),
    WORKORDER_COMPLETE(XbbRefTypeEnum.WORK_ORDER.getCode(), 8, "enum.pushType.name.workorder_complete", "workOrderComplete", 1 ,""),
    WORKORDER_CLOSE(XbbRefTypeEnum.WORK_ORDER.getCode(), 9, "enum.pushType.name.workorder_close", "workOrderClose", 1, ""),
    WORKORDER_RESTART(XbbRefTypeEnum.WORK_ORDER.getCode(), 10, "enum.pushType.name.workorder_restart", "workOrderRestart", 1, ""),
    WORKORDER_TRANSFER(XbbRefTypeEnum.WORK_ORDER.getCode(), 11, "enum.pushType.name.workorder_transfer", "workorderTransfer", 1, ""),
    WORKORDER_ROLLBACK(XbbRefTypeEnum.WORK_ORDER.getCode(), 12, "enum.pushType.name.workorder_rollback", "workOrderRollback", 1, ""),
    WORKORDER_COMMENT_LIKE_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 13, "enum.pushType.name.workorder_comment_like_push","workorderCommentLikePush", 1, ""),
    WORKORDER_COMMENT_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 14, "enum.pushType.name.workorder_comment_push","workorderCommentPush", 1, ""),
    WORKORDER_COMMENT_AT(XbbRefTypeEnum.WORK_ORDER.getCode(), 15, "enum.pushType.name.workorder_comment_at","workorderCommentAt", 1, ""),

    WORKORDER_DYNAMIC_UPDATE_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 16, "enum.pushType.name.workorder_dynamic_update_push", "workOrderUpdatePush", 1, ""),
    WORKORDER_DYNAMIC_DEL_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 17, "enum.pushType.name.workorder_dynamic_del_push", "workOrderDelPush", 1, ""),
    WORKORDER_COMMENT_DEL_PUSH(XbbRefTypeEnum.WORK_ORDER.getCode(), 18, "enum.pushType.name.workorder_comment_del_push","workOrderCommentDelPush", 1, ""),


    //******************************************sfa***********************************************//
    /**
     * sfa code 3401
     */
    //截止这个时间点时,目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
    SFA_PUSH(XbbRefTypeEnum.AI_ASSISTANT.getCode(), 0, "enum.pushType.name.sfa_push", "sfaPush", 0, ""),
    SFA_CUSTOMER_PUSH(XbbRefTypeEnum.AI_ASSISTANT.getCode(), 1, "enum.pushType.name.sfa_customer_push", "sfaCustomerPush", 0, ""),
    SFA_OPPORTUNITY_PUSH(XbbRefTypeEnum.AI_ASSISTANT.getCode(), 2, "enum.pushType.name.sfa_opportunity_push", "sfaOpportunityPush", 0, ""),
    SFA_CONTRACT_PUSH(XbbRefTypeEnum.AI_ASSISTANT.getCode(), 3, "enum.pushType.name.sfa_contract_push", "sfaContractPush", 0, ""),
    SFA_CONTACT_PUSH(XbbRefTypeEnum.AI_ASSISTANT.getCode(), 4, "enum.pushType.name.sfa_contact_push", "sfaContactPush", 0, ""),


    //******************************************系统***********************************************//
    /**
     * 系统 code 0
     */
    //截止这个时间点时,SYSTEM_PUSH目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
    SYSTEM_PUSH(XbbRefTypeEnum.SYSTEM.getCode(), 0, "enum.pushType.name.system_push", "systemPush", 1, ""),
    NEW_SIGNATURE_PUSH(XbbRefTypeEnum.SYSTEM.getCode(), 1, "enum.pushType.name.new_signature_push", "newSignaturePush", 1, ""),
    QUESTIONNAIRE_PUSH(XbbRefTypeEnum.SYSTEM.getCode(), 2, "enum.pushType.name.questionnaire_push", "questionnairePush", 1, ""),
    RENEW_PUSH(XbbRefTypeEnum.SYSTEM.getCode(), 3, "enum.pushType.name.renew_push", "renewPush", 1, ""),
    ACTIVITY_OPERATION_PUSH(XbbRefTypeEnum.SYSTEM.getCode(), 4, "enum.pushType.name.activity_operation_push", "activityOperationPush", 1, ""),
    INVITE_STAFF_PUSH(XbbRefTypeEnum.SYSTEM.getCode(), 5, "enum.pushType.name.invite_staff_push", "inviteStaffPush", 1, ""),
    /**
     * 弃用  续签直接打电话的
     */
    EXPIRED_PUSH(XbbRefTypeEnum.SET_MEAL.getCode(), 0, "enum.pushType.name.expired_push", "expiredPush", 1, ""),

    //***********************************************************************************************//

    // 现在没有活动 焕勇说的  @author 魏荣杰  @date 2019/1/25 15:02
//    ACTIVITY_PUSH(250, 0, "活动推送", "activityPush", 1, ""),

    /**
     * 导出 code 3701
     */
    EXPORT_PUSH(XbbRefTypeEnum.EXPORT.getCode(),0,XbbRefTypeEnum.EXPORT.getName(),XbbRefTypeEnum.EXPORT.getAlias(),1,""),
    /**
     * 导出失败 code 3702 pro中方案改变弃用  @author 魏荣杰  @date 2019/1/28 9:27
     */
    EXPORT_PUSH_FAIL(XbbRefTypeEnum.EXPORT_FAIL.getCode(),0,XbbRefTypeEnum.EXPORT_FAIL.getName(),XbbRefTypeEnum.EXPORT_FAIL.getAlias(),1,""),

    /**
     * 报价单 code 4700
     */
    QUOTATION_PUSH(XbbRefTypeEnum.QUOTATION.getCode(), 0, "enum.pushType.name.quotation_push","quotationPush", 1, ""),
    QUOTATION_ADD_PUSH(XbbRefTypeEnum.QUOTATION.getCode(), 1, "enum.pushType.name.quotation_add_push","quotationAddPush", 1, ""),
    QUOTATION_CHANGE_PUSH(XbbRefTypeEnum.QUOTATION.getCode(), 2, "enum.pushType.name.quotation_change_push","quotationChangePush", 1, ""),
    QUOTATION_STATUS_PUSH(XbbRefTypeEnum.QUOTATION.getCode(), 3, "enum.pushType.name.quotation_status_push", "quotationStatusPush", 1, ""),
    QUOTATION_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.QUOTATION.getCode(), 4, "enum.pushType.name.quotation_team_add_del_main_push", "quotationTeamAddDelMainPush", 1, ""),
    QUOTATION_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.QUOTATION.getCode(), 5, "enum.pushType.name.quotation_team_add_del_synergetic_push", "quotationTeamAddDelSynergeticPush", 1, ""),

    /**
     * 报价单到期提醒 4703
     */
    QUOTATION_REMIND(XbbRefTypeEnum.QUOTATION_REMIND.getCode(), 0, "enum.pushType.name.quotation_remind","quotationRemind", 0, ""),

    /**
     * AI消息推送
     */
    DATA_IMPORT(XbbRefTypeEnum.DATA_IMPORT.getCode(), 0, "enum.pushType.name.data_import","dataImport", 0, ""),
    TRAIN_MODEL(XbbRefTypeEnum.TRAIN_MODEL.getCode(), 0, "enum.pushType.name.train_model","trainModel", 0, ""),

    /**
     * 线索 8000
     */
    CLUE_PUSH(XbbRefTypeEnum.CLUE.getCode(), 0, "enum.pushType.name.clue_push", "cluePush", 1, ""),
    CLUE_ADD_PUSH(XbbRefTypeEnum.CLUE.getCode(), 1, "enum.pushType.name.clue_add_push", "clueAddPush", 1, ""),
    CLUE_CHANGE_PUSH(XbbRefTypeEnum.CLUE.getCode(), 2, "enum.pushType.name.clue_change_push", "clueChangePush", 1, ""),
    CLUE_HANDOVER_PUSH(XbbRefTypeEnum.CLUE.getCode(), 3, "enum.pushType.name.clue_handover_push", "clueHandoverPush", 1, ""),
    CLUE_DISTRIBUTION_PUSH(XbbRefTypeEnum.CLUE.getCode(), 4, "enum.pushType.name.clue_distribution_push", "clueDistributionPush", 1, ""),
    //这个CLUE_BACK_PUBLIC枚举用于推送设置页 推送线索即将退回公海池消息时请用 CLUE_BACK_PUSH 和 CLUE_WILL_BACK_PUSH
    CLUE_BACK_PUBLIC(XbbRefTypeEnum.CLUE.getCode(), 5, "enum.pushType.name.clue_back_public", "clueBackPublic", 1, ""),
    CLUE_TRANSFER_PUBLIC(XbbRefTypeEnum.CLUE.getCode(), 8, "enum.pushType.name.clue_transfer_public", "clueTransferPublic", 1, ""),
    CLUE_TEAM_ADD_DEL_MAIN(XbbRefTypeEnum.CLUE.getCode(), 6, "enum.pushType.name.clue_team_add_del_main", "clueTeamAddDelMain", 1, ""),
    CLUE_TEAM_ADD_DEL_SYNERGETIC(XbbRefTypeEnum.CLUE.getCode(), 7, "enum.pushType.name.clue_team_add_del_synergetic", "clueTeamAddDelSynergetic", 1, ""),
    /**
     * 线索阶段 code 8005
      */
    CLUE_STAGE(XbbRefTypeEnum.CLUE_STAGE.getCode(),0,"enum.pushType.name.clue_stage","clueStagePush",1,""),
    /**
     * 线索退回公海池 code 8007
     */
    CLUE_BACK_PUSH(XbbRefTypeEnum.CLUE_BACK_REMIND.getCode(), 0, "enum.pushType.name.clue_back_push", "clueBackPush", 0, ""),
    CLUE_WILL_BACK_PUSH(XbbRefTypeEnum.CLUE_BACK_REMIND.getCode(), 1, "enum.pushType.name.clue_will_back_push", "clueWillBackPush", 0, ""),
    /**
     * 线索即将退回公海池提醒 8010
     */
    CLUE_TRANSFER_PUSH(XbbRefTypeEnum.CLUE_TRANSFER_REMIND.getCode(), 0, "enum.pushType.name.clue_transfer_push", "clueTransferPush", 0, ""),
    CLUE_WILL_TRANSFER_PUSH(XbbRefTypeEnum.CLUE_TRANSFER_REMIND.getCode(), 1, "enum.pushType.name.clue_will_transfer_push", "clueWillTransferPush", 0, ""),

    //******************************************数据中心***********************************************//
    /**
     * code 9000
     */
    //截止这个时间点时,目前这些没在用,如果后面用了,请注明  @author 魏荣杰  @date 2018/8/22 15:38
    DATA_CENTER_PUSH(XbbRefTypeEnum.DATA_CENTER.getCode(), 0, "enum.pushType.name.data_center_push", "dataCenterPush", 0, ""),
    DATA_WARNING_PUSH(XbbRefTypeEnum.DATA_WARNING.getCode(), 1, "enum.pushType.name.data_warning_push", "dataWarningPush", 0, ""),
    /**
     * 回款计划 5301
     */
    PAYMENT_TASK_PUSH(XbbRefTypeEnum.PAYMENT_TASK.getCode(), 0, "enum.pushType.name.payment_task_push", "paymentTaskPush", 1, ""),
    PAYMENT_TASK_ADD_PUSH(XbbRefTypeEnum.PAYMENT_TASK.getCode(), 1, "enum.pushType.name.payment_task_add_push", "paymentTaskAddPush", 1, ""),

    /**
     * 经销商 9501
     */

    DISTRIBUTOR_PUSH(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), 0, "enum.pushType.name.distributor_push", "distributorPush", 1, ""),
    DISTRIBUTOR_ADD_PUSH(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), 1, "enum.pushType.name.distributor_add_push", "distributorAddPush", 1, ""),
    DISTRIBUTOR_HANDOVER_PUSH(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), 2, "enum.pushType.name.distributor_handover_push", "distributorHandoverPush", 1, ""),
//    DISTRIBUTOR_DISTRIBUTION_PUSH(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), 3, "enum.pushType.name.distributor_distribution_push", "distributorDistributionPush", 1, ""),
    DISTRIBUTOR_TEAM_ADD_DEL_MAIN(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), 4, "enum.pushType.name.distributor_team_add_del_main", "distributorTeamAddDelMain", 1, ""),
    DISTRIBUTOR_TEAM_ADD_DEL_SYNERGETIC(XbbRefTypeEnum.DISTRIBUTOR_MANAGEMENT.getCode(), 5, "enum.pushType.name.distributor_team_add_del_synergetic", "distributorTeamAddDelSynergetic", 1, ""),
    /**
     * 经销商联系人 9502
     */
    DISTRIBUTOR_CONTACT_PUSH(XbbRefTypeEnum.DISTRIBUTOR_CONTACT.getCode(), 0, "enum.pushType.name.distributor_contact_push", "distributorContactPush", 1, ""),
    DISTRIBUTOR_CONTACT_ADD_PUSH(XbbRefTypeEnum.DISTRIBUTOR_CONTACT.getCode(), 1, "enum.pushType.name.distributor_contact_add_push", "distributorContactAddPush", 1, ""),
    /**
     * 经销商跟进记录 9503
     */
    DISTRIBUTOR_COMMUNICATE_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), 0, "enum.pushType.name.distributor_communicate_push", "distributorCommunicatePush", 1, ""),
    DISTRIBUTOR_COMMUNICATE_ADD_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), 1, "enum.pushType.name.distributor_communicate_add_push", "distributorCommunicateAddPush", 1, ""),
    DISTRIBUTOR_COMMUNICATE_LIKE_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), 2, "enum.pushType.name.distributor_communicate_like_push","distributorCommunicateLikePush", 1, ""),
    DISTRIBUTOR_COMMUNICATE_COMMENT_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), 3, "enum.pushType.name.distributor_communicate_comment_push","distributorCommunicateCommentPush", 1, ""),
    DISTRIBUTOR_COMMUNICATE_REPLY_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), 4, "enum.pushType.name.distributor_communicate_reply_push","distributorCommunicateReplyPush", 1, ""),
    DISTRIBUTOR_COMMUNICATE_AT_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(), 5, "enum.pushType.name.distributor_communicate_at_push", "distributorCommunicateAtPush", 1, ""),
    DISTRIBUTOR_COMMUNICATE_COMMENT_DEL_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COMMUNICATE.getCode(),6, "enum.pushType.name.distributor_communicate_comment_del_push","distributorCommunicateCommentDelPush",1,""),

    /**
     * 订货单 9510
     */
    ORDER_PUSH(XbbRefTypeEnum.ORDER.getCode(), 0, "enum.pushType.name.order_push","orderPush", 1, ""),
    ORDER_ADD_PUSH(XbbRefTypeEnum.ORDER.getCode(), 1, "enum.pushType.name.order_add_push","orderAddPush", 1, ""),
    ORDER_CHANGE_PUSH(XbbRefTypeEnum.ORDER.getCode(), 2, "enum.pushType.name.order_change_push","orderChangePush", 1, ""),
    ORDER_TEAM_ADD_DEL_MAIN_PUSH(XbbRefTypeEnum.ORDER.getCode(), 3, "enum.pushType.name.order_team_add_del_main_push", "orderTeamAddDelMainPush", 1, ""),
    ORDER_TEAM_ADD_DEL_SYNERGETIC_PUSH(XbbRefTypeEnum.ORDER.getCode(), 4, "enum.pushType.name.order_team_add_del_synergetic_push", "orderTeamAddDelSynergeticPush", 1, ""),

    /**
     * 经销商订货单
     */
    DISTRIBUTOR_ORDER_PUSH(XbbRefTypeEnum.DISTRIBUTOR_ORDER.getCode(), 0, "enum.pushType.name.distributor_order_push","distributorOrderPush", 1, ""),
    DISTRIBUTOR_ORDER_ADD_PUSH(XbbRefTypeEnum.DISTRIBUTOR_ORDER.getCode(), 1, "enum.pushType.name.distributor_order_add_push","distributorOrderAddPush", 1, ""),
    DISTRIBUTOR_ORDER_REVIEW_PUSH(XbbRefTypeEnum.DISTRIBUTOR_ORDER.getCode(), 2, "enum.pushType.name.distributor_order_review_push","distributorOrderReviewPush", 1, ""),
    DISTRIBUTOR_ORDER_ABANDONED_PUSH(XbbRefTypeEnum.DISTRIBUTOR_ORDER.getCode(), 3, "enum.pushType.name.distributor_order_abandoned_push","distributorOrderAbandonedPush", 1, ""),
    DISTRIBUTOR_ORDER_CLOSE_PUSH(XbbRefTypeEnum.DISTRIBUTOR_ORDER.getCode(), 4, "enum.pushType.name.distributor_order_close_push","distributorOrderClosePush", 1, ""),
    DISTRIBUTOR_ORDER_SHIP_PUSH(XbbRefTypeEnum.DISTRIBUTOR_ORDER.getCode(), 5, "enum.pushType.name.distributor_order_ship_push","distributorOrderShipPush", 1, ""),

    /**
     * 经销商退货单
     */
    DISTRIBUTOR_REFUND_PUSH(XbbRefTypeEnum.RETURN.getCode(), 0, "enum.pushType.name.distributor_refund_push","distributorRefundPush", 1, ""),
    DISTRIBUTOR_REFUND_REVIEW_PUSH(XbbRefTypeEnum.RETURN.getCode(), 1, "enum.pushType.name.distributor_refund_review_push","distributorRefundReviewPush", 1, ""),
    DISTRIBUTOR_REFUND_ABANDONED_PUSH(XbbRefTypeEnum.RETURN.getCode(), 2, "enum.pushType.name.distributor_refund_abandoned_push","distributorRefundAbandonedPush", 1, ""),
    DISTRIBUTOR_REFUND_CLOSE_PUSH(XbbRefTypeEnum.RETURN.getCode(), 3, "enum.pushType.name.distributor_refund_close_push","distributorRefundClosePush", 1, ""),

    /**
     * 营销活动消息推送 9003
     */
    MARKETING_ACTIVITY_MANAGEMENT_PUSH(XbbRefTypeEnum.MARKETING_ACTIVITY_MANAGEMENT.getCode(), 0, "enum.pushType.name.marketing_activity_management_push","marketingActivityManagementPush", 1, ""),
    MARKETING_ACTIVITY_MANAGEMENT_ONLINE_PUSH(XbbRefTypeEnum.MARKETING_ACTIVITY_MANAGEMENT.getCode(), 1, "enum.pushType.name.marketing_activity_management_online_push","marketingActivityManagementOnlinePush", 1, ""),

    /**
     * 营销活动消息推送(经销商) 9010
     */
    DISTRIBUTOR_MARKETING_ACTIVITY_MANAGEMENT_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 0, "enum.pushType.name.distributor_marketing_activity_management_push","distributorMarketingActivityManagementPush", 1, ""),
    DISTRIBUTOR_MARKETING_ACTIVITY_MANAGEMENT_ONLINE_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 1, "enum.pushType.name.distributor_marketing_activity_management_online_push","distributorMarketingActivityManagementOnlinePush", 1, ""),


    /**
     * 促销活动消息推送 9007
     */
    PROMOTION_ACTIVITY_MANAGEMENT_PUSH(XbbRefTypeEnum.PROMOTION_ACTIVITY_MANAGEMENT.getCode(), 0, "enum.pushType.name.promotion_activity_management_push","promotionActivityManagementPush", 1, ""),
    PROMOTION_ACTIVITY_MANAGEMENT_ONLINE_PUSH(XbbRefTypeEnum.PROMOTION_ACTIVITY_MANAGEMENT.getCode(), 1, "enum.pushType.name.promotion_activity_management_online_push","promotionActivityManagementOnlinePush", 1, ""),

    /**
     * 促销活动消息推送（经销商）9010
     */
    DISTRIBUTOR_PROMOTION_ACTIVITY_MANAGEMENT_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 0, "enum.pushType.name.distributor_promotion_activity_management_push","distributorPromotionActivityManagementPush", 1, ""),
    DISTRIBUTOR_PROMOTION_ACTIVITY_MANAGEMENT_ONLINE_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 1, "enum.pushType.name.distributor_promotion_activity_management_online_push","distributorPromotionActivityManagementOnlinePush", 1, ""),

    /**
     * 优惠券推送（经销商）9010
     */
    DISTRIBUTOR_COUPON_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 0, "enum.pushType.name.distributor_coupon_push","distributorPromotionActivityManagementPush", 1, ""),
    DISTRIBUTOR_COUPON_GET_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 1, "enum.pushType.name.distributor_coupon_get_push","distributorPromotionActivityManagementOnlinePush", 1, ""),
    DISTRIBUTOR_COUPON_USE_PUSH(XbbRefTypeEnum.DISTRIBUTOR_COUPON.getCode(), 2, "enum.pushType.name.distributor_coupon_use_push","distributorPromotionActivityManagementOnlinePush", 1, ""),


    /**
     * 对账单 5403
     */
    STATEMENT_PUSH(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), 0, "enum.pushType.name.statement_push", "statementPush", 1, ""),
    STATEMENT_GENERATE_PUSH(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), 1, "enum.pushType.name.statement_generate_push", "statementGeneratePush", 1, ""),
    STATEMENT_REMIND_CONFIRM_PUSH(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), 2, "enum.pushType.name.statement_remind_confirm_push", "statementRemindConfirmPush", 1, ""),
    STATEMENT_VALET_CONFIRM_PUSH(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), 3, "enum.pushType.name.statement_valet_confirm_push", "statementValetConfirmPush", 1, ""),
    STATEMENT_REGENERATE_PUSH(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), 4, "enum.pushType.name.statement_regenerate_push", "statementRegeneratePush", 1, ""),
    STATEMENT_QUESTION_FEEDBACK_PUSH(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getCode(), 5, "enum.pushType.name.statement_question_feedback_push", "statementQuestionFeedbackPush", 1, ""),

    /**
     * 固定额度
     */
    CREDIT_LIMIT_PUSH(XbbRefTypeEnum.CREDIT_LIMIT.getCode(), 0, "enum.pushType.name.credit_limit_push", "creditLimitPush", 1, ""),
    CREDIT_FIXED_LIMIT_CHANGE_PUSH(XbbRefTypeEnum.CREDIT_FIXED_LIMIT.getCode(), 1, "enum.pushType.name.fixed_limit_change_push", "fixedLimitChangePush", 1, ""),
    /**
     * 工作流消息推送
     */
    WORKFLOW_SEND_MESSAGE(XbbRefTypeEnum.WORKFLOW_SEND_MESSAGE.getCode(), 0, "enum.pushType.name.clue_back_push", "workflowSendMessage", 0, ""),

    // 阶段超时提醒推送
    STAGE_TIMEOUT_REMIND_PUSH(XbbRefTypeEnum.STAGE_TIMEOUT_REMIND.getCode(), 0, "enum.pushType.name.stage_timeout_remind_push", "stageTimeoutRemindPush", 1, ""),
    CUSTOMER_STAGE_TIMEOUT_REMIND_PUSH(XbbRefTypeEnum.STAGE_TIMEOUT_REMIND.getCode(), 1, "enum.pushType.name.customer_stage_timeout_remind_push", "customerStageTimeoutRemindPush", 1, ""),
    OPPORTUNITY_STAGE_TIMEOUT_REMIND_PUSH(XbbRefTypeEnum.STAGE_TIMEOUT_REMIND.getCode(), 2, "enum.pushType.name.opportunity_stage_timeout_remind_push", "opportunityStageTimeoutRemindPush", 1, ""),
    CLUE_STAGE_TIMEOUT_REMIND_PUSH(XbbRefTypeEnum.STAGE_TIMEOUT_REMIND.getCode(), 3, "enum.pushType.name.clue_stage_timeout_remind_push", "clueStageTimeoutRemindPush", 1, ""),
    PAAS_STAGE_TIMEOUT_REMIND_PUSH(XbbRefTypeEnum.STAGE_TIMEOUT_REMIND.getCode(), 4, "enum.pushType.name.paas_stage_timeout_remind_push", "paasStageTimeoutRemindPush", 1, ""),
    CONTRACT_STAGE_TIMEOUT_REMIND_PUSH(XbbRefTypeEnum.STAGE_TIMEOUT_REMIND.getCode(), 5, "enum.pushType.name.contract_stage_timeout_remind_push", "contractStageTimeoutRemindPush", 1, ""),

    PAAS_STAGE(XbbRefTypeEnum.PAAS_STAGE.getCode(),0,"enum.pushType.name.paas_stage","paasStagePush",1,""),
    APPROVAL_PUSH_ADD_COMMENT(XbbRefTypeEnum.APPROVAL.getCode(), 0, "enum.pushType.name.approval_push_add_comment","approvalPushAddComment", 1, ""),
    /**
     * 客户公海次模式切换完成消息推送
     */
    CUSTOMER_PUBLIC_POOL_MODEL_CHANGE_MESSAGE(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), 0, "enum.pushType.name.customer_public_pool_model_change_message", "customerPublicPoolModelChangeMessage", 0, ""),
    /**
     * 线索公海次模式切换完成消息推送
     */
    CLUE_PUBLIC_POOL_MODEL_CHANGE_MESSAGE(XbbRefTypeEnum.CLUE.getCode(), 0, "enum.pushType.name.clue_public_pool_model_change_message", "cluePublicPoolModelChangeMessage", 0, ""),

    /**
     * 新工单消息推送
     */
    WORK_ORDER_V2_PUSH(XbbRefTypeEnum.WORK_ORDER_V2.getCode(), 0, "enum.pushType.name.work_order_v2_push", "workOrderV2Push", 0, ""),
    WORK_ORDER_V2_DYNAMIC_PUSH(XbbRefTypeEnum.WORK_ORDER_V2.getCode(), 1, "enum.pushType.name.work_order_v2_dynamic_push", "workOrderV2DynamicPush", 1, ""),
    WORK_ORDER_V2_COMMENT_AT(XbbRefTypeEnum.WORK_ORDER_V2.getCode(), 2, "enum.pushType.name.work_order_v2_comment_at","workOrderV2CommentAt", 1, ""),
    WORKORDER_V2_COMMENT_LIKE_PUSH(XbbRefTypeEnum.WORK_ORDER_V2.getCode(), 4, "enum.pushType.name.work_order_v2_comment_like_push","workorderV2CommentLikePush", 1, ""),
    WORKORDER_V2_COMMENT_PUSH(XbbRefTypeEnum.WORK_ORDER_V2.getCode(), 5, "enum.pushType.name.work_order_v2_comment_push","workorderV2CommentPush", 1, ""),

    WORKORDER_V2_DYNAMIC_UPDATE_PUSH(XbbRefTypeEnum.WORK_ORDER_V2.getCode(), 6, "enum.pushType.name.work_order_v2_dynamic_update_push", "workOrderV2UpdatePush", 1, ""),
    /**
     * code 404
     */
    UNKNOWN(XbbRefTypeEnum.UNKNOWN.getCode(), 0, "enum.pushType.name.unknown", "unknown", 0, ""),

    ;
    /** 枚举值 -- 推送类型标识*/
    private final int		code;

    /** 枚举值 -- 推送子类型标识*/
    private final int		subCode;

    /** 枚举信息--推送名称*/
    private final String    name;

    /** 枚举描述 --角色使用时状态*/
    private final String	alias;

    /** 枚举描述 --是否实时推送*/
    private final int	isRealTime;

    /** 枚举描述 --钉钉文档中的推送类型*/
    private final String	ddPushType;

    /**
     * 构造一个<code>SubModuleEnum</code>枚举对象
     *
     * @param code 类型
     * @param subCode 子类型
     * @param name 中文名
     * @param alias 英文名
     * @param isRealTime 是否实时推送
     * @param ddPushType 推送类型
     */
    PushTypeEnum(int code, int subCode, String name,String alias, int isRealTime, String ddPushType) {
        this.code = code;
        this.subCode = subCode;
        this.name = name;
        this.alias = alias;
        this.isRealTime = isRealTime;
        this.ddPushType = ddPushType;
    }

    /**
     * 通过枚举<code>alias</code>获得枚举
     *
     * @param alias 英文名
     * @return WxErrorCodeEnum
     */
    public static PushTypeEnum getByAlias(String alias) {
        for (PushTypeEnum cacheCode : values()) {
            if (cacheCode.getAlias().equals(alias)) {
                return cacheCode;
            }
        }
        return UNKNOWN;
    }

    /**
     * 通过枚举<code>code</code>获得枚举
     *
     * @param code 英文名
     * @return WxErrorCodeEnum
     */
    public static PushTypeEnum getByCode(Integer code) {
        for (PushTypeEnum cacheCode : values()) {
            if (code.equals(cacheCode.getCode())) {
                return cacheCode;
            }
        }
        return UNKNOWN;
    }

    /**
     * 获取全部枚举
     *
     * @return List<WxErrorCodeEnum>
     */
    public List<PushTypeEnum> getAllEnum() {
        List<PushTypeEnum> list = new ArrayList<>();
        for (PushTypeEnum cache : values()) {
            if (cache == UNKNOWN) {
                continue;
            }
            list.add(cache);
        }
        return list;
    }

    /**
     * 获取全部枚举
     *
     * @param type 类型
     * @return List<WxErrorCodeEnum>
     */
    public static List<PushTypeEnum> getAllEnumByType(Integer type) {
        List<PushTypeEnum> list = new ArrayList<>();
        for (PushTypeEnum cache : values()) {
            if(cache.getCode() == type){
                list.add(cache);
            }
        }

        for (int i = 0; i < list.size(); i++) {
            for (int j = i+1; j < list.size(); j++) {
                PushTypeEnum enumEntity;
                if (list.get(j).getSubCode() < list.get(i).getSubCode()) {
                    enumEntity = list.get(i);
                    list.set(i, list.get(j));
                    list.set(j, enumEntity);
                }
            }

        }
        return list;
    }

    /**
     * 获取全部枚举值
     *
     * @return List<String>
     */
    public List<String> getAllEnumAlis() {
        List<String> list = new ArrayList<>();
        for (PushTypeEnum cache : values()) {
            if (cache == UNKNOWN) {
                continue;
            }
            list.add(cache.getAlias());
        }
        return list;
    }

    /**
     * Description:根据code和subCode获取枚举
     * @param code 类型
     * @param subCode 子类型
     * @author 魏荣杰
     * @date 2018/7/23 8:42
     * @since v3.25
     */
    public static PushTypeEnum getPushTypeByCodeAndSubCode(Integer code, Integer subCode) {
        for (PushTypeEnum cache : values()) {
            if (cache.getCode() == code) {
                if (cache.getSubCode() == subCode) {
                    return cache;
                }
            }
        }
        return UNKNOWN;
    }

    /**
     * Description: 根据code获取所有的subcode
     * @param code code
     * @return java.util.List<java.lang.Integer>
     * @author 魏荣杰
     * @date 2019/1/7 20:15
     * @since v1.0
     */
    public static List<Integer> getPushSubCodeListByCode(Integer code) {
        List<Integer> subCodes = new ArrayList<>();
        for (PushTypeEnum cache : values()) {
            if (Objects.equals(cache.getCode(), code)) {
                subCodes.add(cache.getSubCode());
            }
        }
        return subCodes;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }

    public static PushTypeEnum getStageTimeoutRemindPushType(Integer businessType) {
        XbbRefTypeEnum xbbRefTypeEnum = XbbRefTypeEnum.getByCode(businessType);
        switch (xbbRefTypeEnum) {
            case CLUE:
                return PushTypeEnum.CLUE_STAGE_TIMEOUT_REMIND_PUSH;
            case CUSTOMER_MANAGEMENT:
                return PushTypeEnum.CUSTOMER_STAGE_TIMEOUT_REMIND_PUSH;
            case SALES_OPPORTUNITY:
                return PushTypeEnum.OPPORTUNITY_STAGE_TIMEOUT_REMIND_PUSH;
            case PAAS:
                return PushTypeEnum.PAAS_STAGE_TIMEOUT_REMIND_PUSH;
            case CONTRACT:
                return PushTypeEnum.CONTRACT_STAGE_TIMEOUT_REMIND_PUSH;
            default:
                return UNKNOWN;
        }
    }
}
